package com.rico.queue.consumer;


import com.rico.queue.common.TopicName;
import io.github.majusko.pulsar.annotation.PulsarConsumer;
import lombok.extern.slf4j.Slf4j;
import org.apache.pulsar.client.api.SubscriptionType;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class MessageConsumer {

    //SubscriptionType.Shared，表示共享模式
    @PulsarConsumer(topic = TopicName.BATCH_SYNC_NFT_PROFILE, subscriptionType = SubscriptionType.Shared, clazz = String.class)
    public void consume(String message) {
        log.info("PulsarRealConsumer content:{}", message);
    }
}